<template>
	<view>
		
		<!-- 视频 -->
		<!-- #ifdef MP-WEIXIN -->
		<swiper vertical style="height: 100vh;width: 100%;overflow: hidden;background-color: #000000;" v-if="videolist.length==0"></swiper>
			<view class="" v-if="!userInfo" style="position: absolute; padding: 30upx 10upx; width: 500upx; height: 380upx; top: 30%; text-align: center; border-radius: 30upx; margin-left: 140upx; z-index: 9999; background-color: #ffffff;">
				<image style="width: 140upx; height: 140upx;"
				 :src="imglink + 'person.svg'" mode=""></image>
				<view class="" style="font-size: 40upx; font-weight: bold; color: rgba(0,0,0,0.85); margin-top: 20upx;">
					您还未登录
				</view>
				<view style="font-size: 28upx;color: rgba(0,0,0,0.45);">
					需要登录后才能查看
				</view>
				<button style="width: 370upx; z-index: 9999; margin-top: 30upx; font-size: 28upx; background: #02C15F;border-radius: 8px;"
				  type="primary" open-type="getUserInfo" 
				  @click="getuserinfo">授权登录</button>
			</view>
		<!-- #endif -->
		<view>
			<!-- #ifdef MP-WEIXIN -->
			<view class="back-button-view" @click="backRecommend">
				<image class="back-button" @click="backRecommend"
				 :src="imglink + 'previous .png'" mode=""></image>
			</view>
				
			<!-- #endif -->
			<swiper vertical style="height: 100vh;width: 100%;overflow: hidden;" @change="tabChange" v-if="videolist.length>0">
				<swiper-item v-for="(item,index) in videolist" :key="index">
					 <!-- v-for="(video,index) in video" :key="index"  -->
					<scroll-view scroll-y="true">
						<video class="video-show"
						:src="item.video_url" 
						:controls="false" 
						:show-fullscreen-btn="false" 
						:enable-progress-gesture="false"
						:show-play-btn="false" 
						:current="videoIndex"
						:show-center-play-btn="false"
						@click="startPlay"
						@ended="lucky"
						:loop="true"
						width="100%" 
						webkit-playsinline="true"
						playsinline="true"
						x5-video-player-type="h5"
						x5-video-player-fullscreen="portraint"
						:id="'video_'+item.id"
						:codec="true"
						
						>
						<!-- 播放按钮 -->
						<view class="video-playbutton" v-if="player" @click="startPlay">
							<image :src="imglink + 'videoPlay.png'" style="width: 100upx;height: 100upx;" @click="startPlay"></image>
						</view>
						</video>
						<!-- 右边列表 -->
						<view class="fix-right">
							<!-- 开店 -->
							<button v-if="is_auth_phone == 0" open-type="getPhoneNumber" @click="getphonenumber"></button>
							<button class="fix-right-button" v-if="is_auth_phone == 0" open-type="getPhoneNumber" @click="getphonenumber"></button>
							<button class="fix-right-button-tt" v-if="is_auth_phone == 0" open-type="getPhoneNumber" @click="getphonenumber"></button>
							<image :src="imglink + 'recommend/register.svg'"
							style="width: 220upx;height: 200upx;margin-left: -48upx;margin-bottom: -80upx; position: absolute;"
							@click="openShop"
							v-if="video.is_display_button == 1"></image>
							<!-- 头像 -->
							<image class="fix-right-img-big" style="" :src="video.store.store_logo" @click="jumpMechanism(video.store_id)">
								<image class="fix-right-img-small" :src="imglink + 'recommend/follow.png'" v-if="!video.is_collect_store" @click="videosmall(video)"></image>
							</image>
							<view class="dianz" style="text-align: center;">
								<!-- 爱心 -->
								<image :src="imglink + 'recommend/lovered.svg'" class="fix-right-img" style=" margin-top: 70upx;" v-if="video.is_like == 1" @click="videolove(video)"></image>
								<image :src="imglink + 'recommend/love.svg'" class="fix-right-img" style=" margin-top: 70upx;" v-else @click="videolove(video)"></image>
								<!-- 爱心数字 -->
								<view class="rightnum">{{video.like_video_num + video.auto_likes_num || 0}}</view>
							</view>
							<!-- 微信 -->
							<view class="" @click="wechatOpen" style="text-align: center;">
								<image :src="imglink + 'recommend/weixin.svg'" class="fix-right-img"></image>
								<view class="rightnum">老师微信</view>
								<view class="rightnum">{{video.access_wechat_num}}</view>
							</view>
							<!-- 幸运礼盒 -->
							<view @click="luckyode" style="text-align: center;">
								<view class="red-luck" v-if="video.gift_activity_id == 0">0</view>
								<view class="red-luck" v-if="video.gift_activity_id != 0">1</view>
								<image :src="imglink + 'recommend/welfare.svg'" class="fix-right-img"></image>
								<view class="rightnum">幸运福利</view>
							</view>
							<!-- 分享 -->
							<view class="" @click="Imageshare" style="text-align: center;">
								<image :src="imglink + 'recommend/share.svg'" class="fix-right-img"></image>
								<view class="rightnum">分享</view>
							</view>
						</view>
						<!-- 排行榜 -->
						<view class="video-ranking" @click="rank" v-if="video.is_open">
							<image :src="imglink + 'recommend/medal.png'" style="width: 40upx; height: 50upx; display: inline-block;margin-left: 26upx;"></image>
							<view style="float: right;margin-right: 35upx;margin-top: 10upx;">排行榜</view>
						</view>
						<!-- 课程推荐 -->
						<view class="video-course" v-if="video.activity!=null&&video.activity.name != null">
							<image class="video-course-img" :src="video.activity.image" mode=""></image>
							<view class="video-course-text">{{video.activity.name | getStr(13) || '   '}}</view>
							<view class="video-course-btn" @click="receivCourses(video.activity_id)">查看详情</view>
						</view>
						<!-- 标题 -->
						<view class="video-title">
							<view style="width: 500upx;font-size: 28upx;">{{video.store_name}}</view>
							<view style="margin-top: 20upx;width: 700upx;font-size: 34upx;">{{video.video_detail | getStr(55) || '   '}}</view>
						</view>
						
					</scroll-view>
				</swiper-item>
				
			</swiper>
		</view>
		<!-- 排行榜页面 -->
		<uni-popup ref="rankings" type="bottom">
			<view class="up-ranking">
				<!-- 头像 -->
				<view>
					<image :src="invitePeople.avatar" class="up-ranking-headimg"></image>
					<view class="up-ranking-headname">{{ invitePeople.nickname }}</view>
				</view>
				<!-- 邀请人数、邀请好友 -->
				<view>
					<view style="margin: 20upx auto;width: 100%;text-align: center;">
						<view class="up-ranking-invite-text">已邀请 </view>
						<view class="up-ranking-invite-text" style="color: #FF6E56; margin: 0 8upx;">{{ invitePeople.invite_num || 0 }}</view>
						<view class="up-ranking-invite-text"> 位好友，当前排行名第 </view>
						<view class="up-ranking-invite-text" style="color: #FF6E56; margin: 0 8upx;">{{ invitePeople.rank || 0 }}</view>
						<view class="up-ranking-invite-text"> 名</view>
					</view>
					<!-- #ifdef H5 -->
					<view class="up-ranking-invitation" @click="shareRaik">
						<!-- 微信图标 -->
						<image :src="imglink + 'recommend/weixin.svg'" class="up-ranking-weixin" style="display: inline-block;"></image>
						<view style="display: inline-block;" class="up-ranking-weixin-text" 
						  >邀请好友</view>
					</view>
					<!-- #endif -->
					<!-- #ifdef MP-WEIXIN -->
					<button open-type="share" type="default" class="up-ranking-invitation" style="line-height: 75upx; background-color: #1CB74E;">
						<!-- 微信图标 -->
						<image :src="imglink + 'recommend/weixin.svg'" class="up-ranking-weixin" style="vertical-align: middle;display: inline-block;top: 0upx;left: 0upx;"></image>
						<view style="display: inline-block;	margin-top: 0upx; margin-left: 10upx; vertical-align: middle;" class="up-ranking-weixin-text">邀请好友</view>
					</button>
					<!-- #endif -->
				</view>
				<!-- 水平线 -->
				<view class="up-ranking-level"></view>
				<!-- 奖励说明 -->
				<view style="margin-bottom: 30upx;">
					<view style="margin-left: 30upx;">
						<!-- 颜色块 -->
						<view class="up-ranking-colors"></view>
						<view class="up-ranking-colors-text">奖励说明</view>
					</view>
					<view style="margin: 20upx 0 20upx 60upx;width: 100%;text-align: left;">
						<view class="" style="width: 640upx;">{{ reward.content }} </view>
					</view>
				</view>
				<!-- 邀请排行榜 -->
				<view>
					<view style="margin-left: 30upx;">
						<!-- 颜色块 -->
						<view class="up-ranking-colors"></view>
						<view class="up-ranking-colors-text">邀请排行榜</view>
					</view>
					<scroll-view scroll-y="true" style="height: 320upx; margin-top: 20upx;">
						<view v-for="(item,index) in inviteRank" :key="index">
							<view style="width: 100%;height: 70upx;">
								<!-- 头像、名字 -->
								<view style="margin-top: 10upx;margin-left: 50upx;float: left;display: inline-block;vertical-align: middle;">
									<image :src="item.user_info.avatar" class="up-ranking-headimg-yao"></image>
									<view class="up-ranking-headname-yao">{{item.user_info.nickname}}</view>
								</view>
								<!-- 已邀请多少人 -->
								<view style="margin-top: 10upx; margin-right: 50upx;display: inline-block;float: right;vertical-align: middle;">
									<view class="up-ranking-invite-text-right">已邀请</view>
									<view class="up-ranking-invite-text-right" style="color: #FF6E56;">{{item.invite_num}}</view>
									<view class="up-ranking-invite-text-right">人</view>
								</view>
							</view>
						</view>
					</scroll-view>
				</view>
				<!-- 关闭按钮 -->
				<image :src="imglink + 'recommend/up-ranking-close.svg'" style="width:50upx;height:50upx;position: relative;top:-950upx;left:680upx;" @click="close"></image>
			</view>
		</uni-popup>
		<!-- 老师微信 -->
		<uni-popup ref="wechat" type="center" v-if="video.teacher_wechat">
			<view class="we-chat">
				<!-- 关闭按钮 -->
				<image class="we-chat-close-btn" :src="imglink + 'recommend/close.svg'" mode="" @click="wechatClose"></image>
				<view class="" style="color: #FF8B46;">
					长按保存老师二维码 扫一扫添加老师微信
				</view>
				<image class="we-chat-img" v-if="video.teacher_wechat" :src="video.teacher_wechat.wechat_qrcode" mode="heightFix" style="z-index: 999;" :show-menu-by-longpress="true"></image>
				<view class="wechat-number" v-if="video.teacher_wechat">
					老师微信号：{{ video.teacher_wechat.wechat_number }}
					<view class="wechat-number-btn" @click="copyData(video.teacher_wechat.wechat_number)">
						复制
					</view>
				</view>
				<view class="wechat-number" v-if="video.teacher_wechat">
					老师电话：{{ video.teacher_wechat.telephone }}
					<view class="wechat-number-btn" @click="callPhone(video.teacher_wechat.telephone)">
						拨打
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 幸运福利 -->
		<uni-popup ref="luckys" type="top">
			<view class="up-lucky">
				<!-- 关闭按钮 -->
				<image class="up-lucky-close-btn" :src="imglink + 'recommend/close.svg'" mode="" @click="luckyClose"></image>
				<!-- 幸运降临 -->
				<view style="text-align: center;">
					<image :src="imglink + 'recommend/lucky.png'" style="width: 600upx;height: 240upx;"></image>
				</view>
				<!-- 内容 -->
				<view class="up-lucky-main">
					<image :src="video.gift_activity.image" mode=""></image>
					<view class="up-lucky-main-title">
						{{ video.gift_activity.name }}
					</view>
					<view class="up-lucky-main-btn" @click="receivCourses(video.gift_activity_id)">
						立即领取课程
					</view>
				</view>
				<!-- 分享、重播 -->
				<view class="up-lucky-button-group">
					<!-- #ifdef MP-WEIXIN -->
						<button class="up-lucky-replay-button" style="height: 55upx; line-height: 32upx;" @click="luckyPlay">
							<image :src="imglink + 'replay.png'" mode="" ></image>
							重新播放
						</button>
					<!-- #endif -->
					<!-- #ifdef H5 -->
						<view class="up-lucky-replay-button" @click="luckyPlay">
							<image :src="imglink + 'replay.png'" mode="" ></image>
							重新播放
						</view>
					<!-- #endif -->
					<!-- #ifdef MP-WEIXIN -->
						<button class="up-lucky-share-button" style="height: 55upx; line-height: 30upx;" open-type="share">
							<image :src="imglink + 'circleOfFriends.png'" mode=""></image>
							分享给好友
						</button>
					<!-- #endif -->
					<!-- #ifdef H5 -->
						<view class="up-lucky-share-button" @click="shareRaik">
							<image :src="imglink + 'circleOfFriends.png'" mode=""></image>
							分享给好友
						</view>
					<!-- #endif -->
				</view>
				
				<!-- <image></image> -->
			</view>
		</uni-popup>
		<!-- 分享 -->
		<uni-popup ref="shareTip" :custom="true">
			<image class="share-tip-img" :src="shareImg" mode="" :show-menu-by-longpress="true"></image>
			<view class="" style="position: fixed; width: 100%; left: 0; bottom: 0; background-color: #ffffff; border-radius: 48upx 48upx 0 0;">
				<view class="" style="margin: 28upx 0 8upx 0;">
					<!-- #ifdef MP-WEIXIN -->
						<button type="default" open-type="share" style="margin-left: 160upx;" class="recommend-money-card-block-btn">
							<view class="recommend-money-card-block">
								<view class="recommend-money-card-icon" style="padding: 20upx 32upx 2upx 24upx; margin-left: 25upx;">
									<image :src="imglink + 'shortvideo/wechat.svg'" mode="" style="width: 60upx; height: 60upx;"></image>
								</view>
								发给微信好友
							</view>
						</button>
					<!-- #endif -->
					<!-- #ifdef H5 -->
						<button type="default" class="recommend-money-card-block-btn" style="margin-left: 160upx;" @click="shareRaik">
							<view class="recommend-money-card-block">
								<view class="recommend-money-card-icon" style="padding: 20upx 32upx 2upx 24upx; margin-left: 25upx;">
									<image :src="imglink + 'shortvideo/wechat.svg'" mode="" style="width: 60upx; height: 60upx;"></image>
								</view>
								发给微信好友
							</view>
						</button>
					<!-- #endif -->
					<button type="default" class="recommend-money-card-block-btn" style="margin-left: 170upx; padding: 4upx;" @click="savepicture">
						<view class="recommend-money-card-block">
							<view class="" style="background-color: #ffffff; padding: 0;margin-left: -1upx; margin-bottom: 12upx;">
								<image :src="imglink + 'shortvideo/download.svg'" mode="" style="width: 100upx; height: 100upx;"></image>
							</view>
							保存图片
						</view>
					</button>
				</view>
				<view style="height: 20upx; background-color: #f3f3f3;"></view>
				<view class="" style="text-align: center; font-size: 35upx; font-weight: bold; color: rgba(0,0,0,0.65); height: 80upx;padding-top: 30upx;" @click="shareClose">
					取消
				</view>
			</view>
		</uni-popup>
		<!-- 分享提示 start-->
		<uni-popup ref="share" :custom="true">
			<view class="popup_box_de_share">
				<image class="popup_box_close_share" :src="imglink + 'share_tip.png'"></image>
			</view>
		</uni-popup>
		<!-- 分享提示 end -->
	</view>
</template>

<script>
	import uniPopup from '@/components/uni-popup/uni-popup.vue'
	import { testLogin, userLogin, newInfo, login } from '@/common/login.js';
	//#ifdef H5
		import wx from '@/common/wx-js-sdk.js'
		import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy.js'
	//#endif
	export default {
		data() {
			return {
				page:1,
				videoId:'',
				// 微信号
				wechatNumber:'',
				// 老师电话
				teacherPhone:'',
				// 当前视频是否播放中
				isPlay:true,
				// 屏幕index值
				videoIndex:0,
				// 关注
				small:1,
				// 爱心
				love:1,
				// 排行榜显示
				ranklist:0,
				lastPage:0,
				video:{},
				videolist:[
					
				],
				inviteRank:[],
				invitePeople:{},
				reward:'',
				storeId:'',
				state:'',
				player:false,
				phone_state: 0,//0需要授权电话号码，1不需要
				index:'',
				dingwei:[],
				loginCode:'',
				access_video_id:'',
				is_auth_phone:'',
				share_id:'',
				invite_type:'',
				store_id:'',
				event_id:'',
				shareImg:'',
				invid:'',
				topnum:'',
				inviteOpen:'',
				search:'',
				shareaa: 1,
				userInfo:'',
				userinfo:'',
				option_video_id: 0,
				last_video_id: 0,
				imglink: this.$store.state.imgLink,
				videolength:'',
				isNoNeedLoading: false,
			}
		},
		filters: {
			getStr(str, new_length) {
				// console.log('getStr', str);
				if (!str) {
					return ''
				}
				if (str.length > new_length) {
					return str.slice(0, new_length) + '...'
				} else {
					return str
				}
			},
		},
		async onLoad(options) {
			console.log(options,"789")
			this.videolength=options.videolength
			let id = parseInt(options.id,10);
			const scene = decodeURIComponent(options.scene)
			if(scene!='undefined'){
				const strs = scene.split('=');
				options.store_id = strs[0];
				options.event_id = strs[1];
				options.share_id = strs[2];
				options.invite_type = 'video'
				options.invid=4
			}
			console.log('进入了onload 获取url的scene',scene)
			console.log('进入了onload 获取url的scene',options)
			this.page=0
			this.option_video_id = id
			this.videoId = id
			this.storeId = parseInt(options.store_id,10);
			this.state = parseInt(options.state,10);
			this.index = parseInt(options.index,10);
			if( options.invite_type == 'video' ){
				this.share_id = options.share_id
				this.invite_type = options.invite_type
				this.store_id = options.store_id
				this.event_id = options.event_id
				this.videoId = options.event_id
				this.option_video_id = this.event_id
			}
			let store_id = parseInt(options.store_id, 10);
			this.store_id = store_id
			console.log('进入了onload 获取url的store_id',store_id)
			if (!store_id > 0) {
				store_id = uni.getStorageSync('store_id')
			} else {
				uni.setStorageSync('store_id', store_id)
			}
			this.$store.commit('updateStoreId', store_id)
			
			this.dingwei = uni.getStorageSync('dingwei')
			
			this.topnum = options.topnum
			this.search = options.search
			if(options.share==0){
				this.shareaa=0
			}else{
				this.shareaa = this.$store.state.share
			}
			console.log(this.shareaa,"？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？");
			this.invid = options.invid
			if( options.invid == 1 ){
				console.log("推荐视频");
				await this.getRecommend()
			}else if( options.invid == 2 ){
				console.log("关注视频");
				await this.getCustomer()
			}else if( options.invid == 3 ){
				console.log("科目视频");
				await this.getAubjectsVideo()
			}else if( options.invid == 4 ){
				console.log("店铺视频");
				await this.getStoreVideo()
			}else{
				console.log("店铺视频");
				await this.getStoreVideo()
			}
			this.getVideo()
			console.log('token',this.$store.getters.getToken);
			if(options.page == 'share'){
				let data = {
					token:this.$store.getters.getToken,
					store_id:options.store_id,
					video_id:options.id
				}
				// 3.发送请求
				await this.$api.add_viderUser(data).then(res => {
					if(res.status){
						
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err =>{
					console.log(err)
				})
			}
			this.userInfo = uni.getStorageSync("userInfo")
			if( this.invite_type == 'video' ){
				this.videoId = this.event_id
				let share = 1
				this.$store.commit('updataShare', share)
				console.log(share,"？？？？？？？？？？？？？？？？？？？？？？？？");
				// #ifdef MP-WEIXIN
					this.get_auth_phone()
					await userLogin(this.share_id,this.invite_type,this.store_id,this.event_id).then((res)=>{
						console.log(res)
						console.log(555555)
						this.userInfo = uni.getStorageSync("userInfo")
						this.share=0;
						this.check=2;
						this.videoId = this.event_id
						this.option_video_id = this.event_id
						this.getStoreVideo()
						this.getVideo()
						this.addUserStore()
						// let share = 1
						// this.$store.commit('updataShare', share)
						// console.log(share,"？？？？？？？？？？？？？？？？？？？？？？？？");
					});
				// #endif
			}
		},
		async onShow(options) {
			console.log('进入了onShow 获取url的id',options)
			let that = this
			await that.getCustomer()
			await that.addUserStore()
			if(that.$store.getters.getToken){
				await uni.login({
					provider: 'weixin',
					success(res) {
						console.log(res,'code');
						that.loginCode = res.code
						// that.getTokens(that.loginCode)
					}
				})
			}
		},
		mounted(){
			this.startPlay()
			console.log("789")
		},
		onShareAppMessage(res) {
			this.setActivityShare(this.video.id)
			console.log(this.video.store_id);
			return {
				title: this.video.video_detail,
				path: 'pages/recommend/specific/videoshow?share_id=' + this.userinfo.customer_id +
				'&invite_type=video&store_id=' + this.video.store_id + '&event_id=' + this.video.id,
				imageUrl: this.shareImg
			}
		},
		methods: { 
			backRecommend(){
				if( this.invite_type == 'video' ){
					wx.reLaunch({
						url: '/pages/recommend/recommend?store_id=' + this.store_id
					})
				}else{
					console.log("返回");
					uni.navigateBack({
						delta:1
					})
				}
			},
			getCustomer(){
				const data = {
					token:this.$store.getters.getToken,
					store_id:this.store_id
				}
				this.$api.getCustomerInfo(data).then(res => {
					console.log(res)
					if(res.status){
						this.userinfo = res.data.userinfo
						console.log(this.userinfo,'当前用户信息')
						if( this.invid == 2 ){
							this.getFollow()
						}
					}
				}).catch(err => {
					console.log(err)
				})
				// let customer_info = this.$api.getCustomerInfo(data)
				// console.log(this.customer_info)
			},
				addUserStore(){
					let data = {
						token:this.$store.getters.getToken,
						store_id: this.store_id,
						// #ifdef H5
							type:2
						// #endif
						// #ifdef MP-WEIXIN
							type:1
						// #endif
					}
					console.log("add_user_store",data);
					// 3.发送请求
					this.$api.add_user_store(data).then(res => {
						console.log("add_user_store",res);
						if(res.status){
							
						}else{
							uni.showToast({
								title:res.msg,
								icon:'none',
								duration:2000
							})
						}
					}).catch(err =>{
						console.log(err)
					})
				},
			getTokens(code){
				let _selt = this
				uni.request({
					url:_selt.$store.state.URL + '/login/Login/mini_program_login',
					data:{
						code: code,
					},
					method:"POST",
					success(res) {
						console.log(res,'授权登录成功');
						if(res.data.status) {
							_selt.$store.commit('updateToken',res.data.token);
							uni.setStorageSync("shopID",res.store_id)
							_selt.videoId = _selt.event_id
							_selt.getVideo()
						}
						console.log('用户登录后的数据',res.data)
					}
				})
			},
			getuserinfo() {
				
				//#ifdef MP-WEIXIN
				userLogin(this.share_id,this.invite_type,this.store_id,this.event_id).then((res)=>{
					console.log(res)
					console.log(555555)
					this.userInfo = uni.getStorageSync("userInfo")
					this.videoId = this.event_id
					if( this.invid == 1 ){
						this.getRecommend()
					}else if( this.invid == 2 ){
						this.getCustomer()
					}else if( this.invid == 3 ){
						this.getAubjectsVideo()
					}else if( this.invid == 4 ){
						this.getStoreVideo()
					}else{
						this.getStoreVideo()
					}
					// this.getStoreVideo()
					this.getVideo()
					this.addUserStore()
				});	
				//#endif
			},
			// 添加活动分享次数
			setActivityShare(id){
				let data = {
					token: this.$store.getters.getToken,
					video_id: id
				}
				this.$api.add_video_share(data).then(res => {
					console.log(res)
					
				}).catch(err => {
					console.log(err)
				})
			},
			tabChange(e){
				console.log(e);
				var videoplay = uni.createVideoContext('video_'+this.videoId)
				videoplay.pause()
				this.curIndex = e.detail.current;
				// let ind = this.curIndex + this.index
				this.videolist.forEach((data) => {
					if( data.id == this.videolist[this.curIndex].id ){
						this.videoId = data.id
						console.log(this.videoId,'--------------------------------------------------------------------');
					}
				})
				
				// this.LoadingRecommend()
				this.getVideo()
				console.log(this.videolist,'-------')
			},
			// 播放
			startPlay(){
				this.player = !this.player
				if (this.player) {
					var videoplay = uni.createVideoContext('video_'+this.videoId)
					videoplay.pause()
					console.log(this.videoId,'--------------------------------------------------------------------');
				}else{
					var videoplay = uni.createVideoContext('video_'+this.videoId)
					videoplay.play()
					console.log(this.videoId,'--------------------------------------------------------------------');
				}
			},
			// 重新播放
			luckyPlay(){
				var videoplay = uni.createVideoContext('video_'+this.videoId)
				videoplay.pause()
				videoplay.play()
				this.luckyClose()
			},
			getStoreVideo(){
				let data = {
					token:this.$store.getters.getToken,
					long_lati:this.dingwei,
					store_id: this.store_id,
					page: 1,
					pagesize:1000
				}
				console.log("8888888",data);
				// 3.发送请求
				this.$api.select_store_video(data).then(res => {
					console.log(res,"店铺所有视频");
					if(res.status){
						this.videolist = []
						let unshift_video = null
						res.data.data.forEach((item, index) =>{
						  console.log(item) //value
						  console.log(index) //index
						  if(this.option_video_id!=item.id){
							this.videolist.push(item)
							this.last_video_id=item.id
						  }else if(this.option_video_id==item.id){
							  unshift_video=item
						  }
						})
						this.videolist.unshift(unshift_video)
						this.page=res.data.current_page
						this.lastPage = res.data.last_page
						console.log(this.videolist,"****************************************************");
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err =>{
					console.log(err)
				})
			},
			LoadingStoreVideo(){
				this.page ++
				console.log(this.page)
				if(this.page <= this.lastPage){
					let data = {
							token:this.$store.getters.getToken,
							long_lati:this.dingwei,
							store_id: this.store_id,
							page:1,
							pagesize:this.videolength
						}
					this.$api.select_store_video(data).then(res=>{
						let vid = res.data.data
						this.videolist = this.videolist.concat(vid)
						console.log("上拉加载更多的数据.....")
						console.log(this.videolist)
					}).catch(err => {
						console.log(err)
					})
				}else{
					uni.showToast({
						title:'没有更多了',
						icon:'none',
						duration:2000
					})
				}
			},
			// 获取推荐视频
			getRecommend(){
				if( this.invite_type != 'video' ){
					let data = []
					if( this.shareaa == 0 ){
						data = {
							token:this.$store.getters.getToken,
							type:2,
							long_lati:this.dingwei,
							// store_id: this.store_id,
							page:1,
							pagesize:this.videolength
						}
					}else{
						data = {
							token:this.$store.getters.getToken,
							type:2,
							long_lati:this.dingwei,
							store_id: this.store_id,
							page:1,
							pagesize:10
						}
					}
					console.log("??????????????????????????????????????????????????????????",data);
					// 3.发送请求
					this.$api.get_recommend(data).then(res => {
						console.log(res,"545454",data,this.shareaa);
						let _videolist=[]
						if(res.status){
							// let video = res.data.data
							// if(this.state == 1){
							// 	video.forEach(item => {
							// 		if( item.store_id == this.storeId ){
							// 			_videolist.push(item)
							// 		}
							// 	})
							// }else{
							// 	_videolist = video
							// }
							this.videolist = []
							let unshift_video = null
							res.data.data.forEach((item, index) =>{
							  console.log(item) //value
							  console.log(index) //index
							  if(this.option_video_id!=item.id){
								this.videolist.push(item)
								this.last_video_id=item.id
							  }else if(this.option_video_id==item.id){
								  unshift_video=item
							  }
							})
							this.videolist.unshift(unshift_video)
							// this.videolist = res.data.data
							// this.videolist = _videolist.slice(this.index)
							console.log(this.videolist,"推荐视频");
							this.lastPage = res.data.last_page
						}else{
							uni.showToast({
								title:res.msg,
								icon:'none',
								duration:2000
							})
						}
					}).catch(err =>{
						console.log(err)
					})
				}
			},
			LoadingRecommend(){
				if( this.invid == 1 ){
					this.page ++
					// console.log(this.page)
					if(this.page <= this.lastPage){
						let data = []
						if( this.shareaa == 0 ){
							data = {
								token:this.$store.getters.getToken,
								type:2,
								long_lati:this.dingwei,
								// store_id: this.store_id,
								page:1,
								pagesize:10
							}
						}else{
							data = {
								token:this.$store.getters.getToken,
								type:2,
								long_lati:this.dingwei,
								store_id: this.store_id,
								page:1,
								pagesize:10
							}
						}
						console.log(data);
						this.$api.get_recommend(data).then(res=>{
							console.log(res);
							var at = []
							var aa = res.data.data
							if(this.state == 1){
								aa.forEach(item => {
									if( item.store_id == this.storeId ){
										at.push(item)
									}
								})
							}else{
								at = aa
							}
							this.videolist = this.videolist.concat(at)
							console.log("上拉加载更多的数据.....")
							console.log(this.videolist)
						}).catch(err => {
							console.log(err)
						})
					}
				}else if( this.invid == 2 ){
					console.log("？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？",2);
					this.LoadingFollow()
				}else if( this.invid == 3 ){
					console.log("？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？？",3);
					this.LoadingAubjectsVideo()
				}
			},
			// 获取关注视频
			getFollow(){
				let data = {
					token:this.$store.getters.getToken,
					customer_id:this.userinfo.customer_id,
					long_lati:this.dingwei,
					page:1,
					pagesize: this.videolength
				}
				// 3.发送请求
				console.log(data,"获取关注视频");
				this.$api.get_follow(data).then(res => {
					if(res.status){
						this.videolist = res.data.data.slice(this.index)
						this.lastPage = res.data.last_page
						console.log(this.videolist,'关注视频')
					}else{
						// uni.showToast({
						// 	title:res.msg,
						// 	icon:'none',
						// 	duration:2000
						// })
					}
				}).catch(err =>{
					console.log(err)
				})
			},
			// 加载更多关注视频
			LoadingFollow(){
				this.page ++
				console.log(this.page)
				if(this.page <= this.lastPage){
					let data = {
						token:this.$store.getters.getToken,
						customer_id:this.userinfo.customer_id,
						long_lati:this.dingwei,
						page:this.page,
						pagesize:1
					}
					this.$api.get_follow(data).then(res=>{
						this.videolist = this.videolist.concat(res.data.data)
						console.log("上拉加载更多的数据.....")
						console.log(this.videolist)
					}).catch(err => {
						console.log(err)
					})
				}else{
					uni.showToast({
						title:'没有更多了',
						icon:'none',
						duration:2000
					})
				}
			},
			// 获取科目视频
			getAubjectsVideo(){
				let data = {}
				if( this.shareaa == 0 ){
					data  = {
						token:this.$store.getters.getToken,
						long_lati:this.dingwei,
						// store_id: this.store_id,
						subjects_id:this.topnum,
						page:1,
						pagesize:this.videolength
					}
				}else{
					data  = {
						token:this.$store.getters.getToken,
						long_lati:this.dingwei,
						store_id: this.store_id,
						subjects_id:this.topnum,
						page:1,
						pagesize:10
					}
				}
				
				this.$api.get_subjects_video(data).then(res => {
					console.log(res)
					if(res.status){
						this.videolist = res.data.data.slice(this.index)
						console.log(this.videolist,'科目');
						this.lastPage = res.data.last_page
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err => {
					console.log(err)
				})
			},
			LoadingAubjectsVideo(){
				this.page ++
				console.log(this.page)
				if(this.page <= this.lastPage){
					let data = []
					if( this.shareaa == 0 ){
						data  = {
							token:this.$store.getters.getToken,
							long_lati:this.dingwei,
							// store_id: this.store_id,
							subjects_id:this.topnum,
							page:1,
							pagesize:10
						}
					}else{
						data = {
							token:this.$store.getters.getToken,
							long_lati:this.dingwei,
							store_id: this.store_id,
							subjects_id:this.topnum,
							page:1,
							pagesize:10
						}
					}
					this.$api.get_subjects_video(data).then(res=>{
						let vid = res.data.data
						this.videolist = this.videolist.concat(vid)
						console.log("上拉加载更多的数据.....")
						console.log(this.videolist)
					}).catch(err => {
						console.log(err)
					})
				}else{
					uni.showToast({
						title:'没有更多了',
						icon:'none',
						duration:2000
					})
				}
			},
			// 获取视频详情
			getVideo(){
				let data  = {
					token:this.$store.getters.getToken,
					id:this.videoId,
					share_id: this.share_id,
					isNoNeedLoading: this.isNoNeedLoading,
				}
				console.log(this.videoId,"视频");
				this.$api.get_Video(data).then(res => {
					console.log(res)
					if(res.status){
						this.video = res.data
						console.log(this.video,'视频详情');
						this.addvideoUser(this.video)
						// this.getInvite()
					}
				}).catch(err => {
					console.log(err)
				})
			},
			// 添加视频线索用户
			addvideoUser(video){
				let data = {
					token:this.$store.getters.getToken,
					store_id:video.store_id,
					video_id:video.id,
					isNoNeedLoading: this.isNoNeedLoading,
				}
				// 3.发送请求
				this.$api.add_viderUser(data).then(res => {
					if(res.status){
						console.log(res);
						this.access_video_id = res.access_video_id
						this.is_auth_phone = res.is_auth_phone
						
						this.player = false
						
						console.log('开始播放',this.videoId)
						var videoplay = uni.createVideoContext('video_'+this.videoId)
						// videoplay.pause()
						videoplay.play()
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err =>{
					console.log(err)
				})
			},
			// 获取邀请排行榜
			getInvite(){
				let data  = {
					token:this.$store.getters.getToken,
					customer_id:this.video.customer_id,
					store_id:this.video.store_id,
				}
				this.$api.get_invite(data).then(res => {
					console.log(res)
					// this.inviteOpen = res.status
					if(res.status){
						this.invitePeople = res.customerInfo
						this.reward = res.invite_reward
						this.inviteRank = res.rank_data
						
						console.log(this.invitePeople,'用户');
						console.log(this.reward,'邀请奖励');
						console.log(this.inviteRank,'邀请排行榜');
					}
				}).catch(err => {
					console.log(err)
				})
			},
			// 关注
			videosmall(item){
				let data = {
					token:this.$store.getters.getToken,
					store_id:item.store_id,
				}
				this.$api.set_follow(data).then(res => {
					console.log(res,"545454");
					if(res.status){
						this.getVideo()
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err =>{
					console.log(err)
				})
			},
			// 幸运礼盒领取课程
			receivCourses(activity_id){
				uni.navigateTo({
					url: '/pages/home/organization/activeDetail-3?page=details&actId=' + activity_id + '&store_id=' + this.$store.getters.getStoreId
				})
			},
			// 爱心图标切换
			videolove(item){
				this.isNoNeedLoading=true
				let data = {
					token:this.$store.getters.getToken,
					video_id:item.id,
					isNoNeedLoading: this.isNoNeedLoading,
				}
				this.$api.set_like_video(data).then(res => {
					console.log(res,"点赞");
					if(res.status){
						this.getVideo()
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err =>{
					console.log(err)
				})
			},
			// 跳转机构详情页
			jumpMechanism(id){
				console.log("123")
				if( this.state == 1 ){
					
					uni.navigateBack({
						delta:1
					})
				}else{
					uni.navigateTo({
						url: 'mechanism?store_id=' + id
					})
				}
			},
			// #ifdef MP-WEIXIN
				// 保存图片
				savepicture(){
					let that = this
					uni.authorize({
						scope: 'scope.writePhotosAlbum',
						success() {
							console.log(that.shareImg);
							uni.showModal({
								title: '提示',
								content: '确定保存到相册吗',
								success: function (res) {
									if (res.confirm) {
										uni.downloadFile({
											url: that.shareImg,//图片地址
											success: (res) =>{
												if (res.statusCode === 200){
													uni.saveImageToPhotosAlbum({
														filePath: res.tempFilePath,
														success: function() {
															uni.showToast({
																title: "保存成功",
																icon: "none"
															});
														},
														fail: function() {
															uni.showToast({
																title: "保存失败",
																icon: "none"
															});
														}
													});
												} 
											}
										})
									} else if (res.cancel) {
										
									}
								}
							});
						},
						fail() {
							uni.showModal({
								content: '拒绝授权相册权限后无法成功保存海报，是否重新授权？',
								confirmColor: '#00A66A',
								success: function (res) {
									if (res.confirm) {
										uni.openSetting({
											success(res) {
												console.log(res.authSetting)
											}
										});
									} else if (res.cancel) {
										
									}
								}
							})
						}
					})
				},
			// #endif
			// #ifdef H5
				// 保存图片
				savepicture(Url){
					console.log("-----------------------------------------------");
					Url = this.shareImg //图片路径，也可以传值进来
					var triggerEvent = "touchstart"; //指定下载方式
					var blob=new Blob([''], {type:'application/octet-stream'}); //二进制大型对象blob
					var url = URL.createObjectURL(blob); //创建一个字符串路径空位
					var a = document.createElement('a'); //创建一个 a 标签
					a.href = Url;  //把路径赋到a标签的href上
					//正则表达式，这里是把图片文件名分离出来。拿到文件名赋到a.download,作为文件名来使用文本
					a.download = Url.replace(/(.*\/)*([^.]+.*)/ig,"$2").split("?")[0]; 
					/* var e = document.createEvent('MouseEvents');  //创建事件（MouseEvents鼠标事件）
					e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); //初始化鼠标事件（initMouseEvent已弃用）*/
						
					//代替方法。创建鼠标事件并初始化（后面这些参数我也不清楚，参考文档吧 https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent）
					var e = new MouseEvent('click', ( true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null));  
					//派遣后，它将不再执行任何操作。执行保存到本地
					a.dispatchEvent(e); 
					//释放一个已经存在的路径（有创建createObjectURL就要释放revokeObjectURL）
					URL.revokeObjectURL(url);
				},
			// #endif
			// 排行榜显示
			rank(){
				this.$refs.rankings.open()
				console.log('------------')
				this.getInvite()
			},
			// 排行榜关闭
			close(){
				this.$refs.rankings.close()
				console.log('============')
			},
			
			// 幸运礼盒显示
			lucky(){
				if( this.video.gift_activity_id == 0 ){
					
				}else{
					this.$refs.luckys.open()
				}
			},
			luckyode(){
				if( this.video.gift_activity_id == 0 ){
					// uni.showModal({
					// 	content: '该视频无幸运福利',
					// 	confirmColor: '#00A66A',
					// 	showCancel: false,
					// 	success: function (res) {
					// 	}
					// })
				}else{
					this.$refs.luckys.open()
				}
			},
			// 幸运礼盒关闭
			luckyClose(){
				this.$refs.luckys.close()
			},
			
			// 老师微信打开
			wechatOpen(){
				let data = {
					token:this.$store.getters.getToken,
					video_id:this.videoId
				}
				// 3.发送请求
				this.$api.set_wechat(data).then(res => {
					if(res.status){
						this.$refs.wechat.open()
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err =>{
					console.log(err)
				})
			},
			// 老师微信关闭
			wechatClose(){
				this.$refs.wechat.close()
			},
			// #ifdef H5
				// 复制昵称
				copyData(wechatNumber) {
					console.log('点击了复制');
					let content = wechatNumber // 复制内容，必须字符串，数字需要转换为字符串
					const result = h5Copy(content)
					if (result === false) {
						uni.showToast({
							title: '不支持',
						})
					} else {
						uni.showToast({
							title: '复制成功',
							icon: 'none'
						})
					}
				},
			// #endif
			// #ifdef MP-WEIXIN
				copyData(wechatNumber) {
					uni.setClipboardData({
						data: wechatNumber,
						success: function (res) {
							uni.getClipboardData({
								success: function (res) {
									console.log(res.data) // data
								}
							})
						}
					})
				},
			// #endif
			// 拨打
			callPhone(teacherPhone) {
				uni.makePhoneCall({
					phoneNumber: teacherPhone,
					success(res) {
						console.log(res)
					},
					fail(err) {
						console.log(err)
					}
				})
			},
			
			// 分享打开
			Imageshare(){
				let data = {
					token: this.$store.getters.getToken,
					video_id: this.video.id,
					customer_id:this.video.customer_id,
					store_id:this.video.store_id,
					// #ifdef H5
					in_type:'h5',
					// #endif
					// #ifdef MP-WEIXIN
					in_type:'min',
					// #endif
				}
				// 3.发送请求
				this.$api.get_video_post(data).then(res => {
					console.log(res);
					if(res.status){
						this.shareImg = res.data
						this.$refs.shareTip.open()
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err =>{
					console.log(err)
				})
			},
			// 分享关闭
			shareClose(){
				this.$refs.shareTip.close()
			},
			// #ifdef H5
			shareRaik(){
				this.$refs.share.open()
				this.sharePatriarch()
			},
			raikClose(){
				this.$refs.share.close()
			},
			// #endif
			// 开店
			openShop(){
				uni.navigateTo({
					url: '/pages/home/registeredShop?shopShare=1',
				})
			},
			// 分享
			//#ifdef H5
				async sharePatriarch(){
					let signLink = /(Android)/i.test(navigator.userAgent) ? location.href : window.entryUrl;
					console.log(signLink,'signLink99999999999999999999999999999')
					let data = {
						token:this.$store.getters.getToken,
						url:signLink
					}
					// console.log(this.store_info,'1111111')
					let _self = this
					try{
						let shareconfig = await _self.$api.gain_share_data(data)
						console.log(shareconfig,'微信配置');
						const configData = JSON.parse(shareconfig.data)
						
						wx.config(configData)
						console.log(configData,'微信配置');
						wx.ready(function(){
							wx.checkJsApi({
								jsApiList: [
									'updateTimelineShareData',
									'updateAppMessageShareData',
									'onMenuShareAppMessage',
									'onMenuShareTimeline'
								],
								success: function(res) {
									console.log('接口检测成功:'+res);
								},
								error: function(err) {
									console.log('接口检测失败:'+err);
								}
							})
								
							const shareData = { 
								title: '我已经参与，邀请你一起看视频领奖励！', // 分享标题
								desc: _self.video.activity.name, // 分享描述
								link: _self.current_url()+'/pages/recommend/specific/videoshow?store_id=' + _self.video.store_id + '&token='+ _self.$store.getters.getToken + '&customer_id=' + _self.$store.getters.getCustomerId + '&id=' + _self.videoId + '&page=share',
								imgUrl: _self.video.gift_activity.image, // 分享图标
								success: function (res) {
								  console.log(res,'success ---')
								},
								fail:function(err){
									console.log(err.errMsg,'fail ---')
								}
							}
							console.log(shareData,'shareData');
							wx.updateAppMessageShareData(shareData);
							wx.updateTimelineShareData(shareData);
						})
						
					}catch(e){
						console.log(e)
					}
				},
			//#endif
			// #ifdef H5
				getphonenumber:function(e) {
					console.log("123")
					if( !this.state == 1 ){
						uni.navigateBack({
							delta:1
						})
					}else{
						uni.showToast({
							title:'请前往小程序授权',
							icon:'none',
							duration:1500,
							// mask:true
						})
					}
				}
			//#endif
			// #ifdef MP-WEIXIN
				getphonenumber:function(e) {
					let self = this
					uni.checkSession({
						success: function(res) {
							console.log(12,res);
						},
						fail: function(err) {
							uni.login({
								provider: 'weixin',
								success: function(res) {
									self.loginCode = res.code
								},
							})
						}
					})
					console.log(e,"手机号授权");
					// 问用户是否授权手机号码
					if(e.detail.errMsg=='getPhoneNumber:fail user deny'||e.detail.iv==undefined||e.detail.encryptedData==undefined) {
						// this.get_auth_phone()
					}
					else {
						let data = {
							token: self.$store.getters.getToken,
							access_video_id:self.access_video_id,
							iv: e.detail.iv,
							encryptedData: e.detail.encryptedData,
							code: self.loginCode
						}
						self.$api.add_phone(data).then(res => {
							if(res.status) {
								self.get_auth_phone()
								// self.phone = res.data.phoneNumber
								// self.$store.commit('updataPhone',res.data.phoneNumber)
								// self.joinLucky()
								// self.getVideo()
							}
							console.log('添加手机号码',res)
						}).catch(err => {
							console.log('添加手机号码',err)
						})
						console.log('用户同意授权手机号码',data)
					}
				},
				get_auth_phone(){
					let data = {
						token: this.$store.getters.getToken,
						video_id: this.videoId,
						customer_id: this.$store.getters.getCustomerId
					}
					this.$api.get_auth_phone(data).then(res => {
						if(res.status) {
							// this.is_auth_phone=true
							// console.log(this.is_auth_phone,"可以了");
							this.getVideo()
						}
						console.log('授权',res)
					}).catch(err => {
						console.log('授权',err)
					})
				},
			// #endif
		},
		
		components:{
			uniPopup
		},
	}
</script>

<style>
	.video-show{
		width: 100%;
		height: 100vh;
	}
	.video-playbutton{
		width: 100upx;
		height: 100upx;
		position: relative;
		top: 40vh;
		left: 330upx;
		z-index: 999;
	}
	.fix-right{
		width: 120upx;
		float: right;
		margin-right: 8upx;
		position: relative;
		top: -1090upx;
		z-index: 999;
	}
	.fix-right>button:first-child{
		position: fixed;
		height: 130upx;
		width: 120upx;
		margin-top: 180upx;
		padding: 0;
		z-index: 999;
		background-color:rgba(220,38,38,0);
	}
	.fix-right-button{
		position: fixed;
		height: 150upx;
		width: 120upx;
		margin-top: 450upx;
		padding: 0;
		background-color:rgba(220,38,38,0);
	}
	.fix-right-button-tt{
		position: fixed;
		height: 150upx;
		width: 120upx;
		margin-top: 600upx;
		padding: 0;
		background-color:rgba(220,38,38,0);
	}
	.fix-right-img{
		width: 73upx;
		height: 63upx;
		margin-top: 30upx;
	}
	.fix-right-img-cont{
		float: right;
		width: 73upx;
		height: 73upx;
		
	}
	.rightnum{
		color: #FFFFFF;
		height: 30upx;
		font-size: 25upx;
		text-align: center;
	}
	.fix-right-img-big{
		float: right;
		margin-top: 180upx;
		margin-right: 5upx;
		margin-bottom: -20upx;
		width:  110upx; 
		height: 110upx;
		border-radius: 100upx;
		display: block;
	}
	.fix-right-img-small{
		width: 32upx;
		height: 32upx;
		position: absolute;
		margin-left: 45upx;
		margin-top: 270upx;
		z-index: 1;
	}
	.video-title{
		color: #FFFFFF;
		position: relative;
		top:-260upx;
		left: 30upx;
		z-index: 99;
	}
	.video-ranking{
		position: relative;
		float: right;
		width: 180upx;
		height: 55upx;
		/* top: -1180upx; */
		top: -90vh;
		left: 140upx;
		border-radius: 40upx 0 0 40upx;
		background: rgba(51,51,51,0.86);
		color: #FFFFFF;
		z-index: 999;
		font-size: 22upx;
	}
	button::after{ border: none; }
	.video-course{
		position: absolute;
		padding: 10upx;
		margin-left: 30upx;
		font-size: 24upx;
		margin-top: -360upx;
		z-index: 1;
		background: rgba(0,0,0,0.1);
	}
	.video-course-img{
		display: inline-block;
		width: 78upx;
		height: 64upx;
		margin-right: 10upx;
		vertical-align: top;
	}
	.video-course-text{
		display: inline-block;
		width: 200upx;
		color: #ffffff;
		vertical-align: top;
	}
	.video-course-btn{
		display: inline-block;
		margin-top: 5upx;
		padding: 10upx 20upx;
		color: #ffffff;
		vertical-align: top;
		border-radius: 44upx;
		background-image: linear-gradient(90deg, #FE9543 14%, #FF664F 100%);
	}
	.up-ranking{
		width: 100%;
		height: 1000upx;
		border-radius: 48upx 48upx 0 0;
		background-color: #FFFFFF;
	}
	.up-ranking-headimg{
		border-radius: 120upx;
		width: 200upx;
		height: 200upx;
		border: 8upx solid #ffffff;
		margin-left: 35%;
		margin-top: -100upx;
		box-shadow: 0 10px 30px 0 rgba(0,0,0,0.10);
	}
	.up-ranking-headname{
		font-size: 45upx;
		text-align: center;
		color: #000000;
		width: 100%;
	}
	.up-ranking-invite-text{
		display: inline-block;
		font-size: 28upx;
		text-align: center;
	}
	.up-ranking-invitation{
		width: 320upx;
		height: 80upx;
		background-color: #1CB74E;
		border-radius: 40upx;
		margin: 0 auto;
		margin-top: 30upx;
	}
	.up-ranking-weixin{
		width: 48upx;
		height: 40upx;
		top: 10upx;
		left: 60upx;
	}
	.up-ranking-weixin-text{
		color: #FFFFFF;
		margin-top: 16upx;
		font-size: 35upx;
		margin-left: 80upx;
	}
	.up-ranking-level{
		width: 690upx;
		height: 8upx;
		margin: 30upx auto;
		background: #F2F2F2;
	}
	.up-ranking-colors{
		width: 8upx;
		height: 32upx;
		background: #FF674E;
		display: inline-block;
		vertical-align: middle;
		margin-right: 20upx;
	}
	.up-ranking-colors-text{
		display: inline-block;
		font-size: 32upx;
		color: rgba(0,0,0,0.65);
		vertical-align: middle;
	}
	.up-ranking-headimg-yao{
		width: 48upx;
		height: 48upx;
		vertical-align: middle;
		margin-right: 20upx;
		display: inline-block;
		border-radius: 80upx;
	}
	.up-ranking-headname-yao{
		font-size: 28upx;
		color: rgba(0,0,0,0.65);
		vertical-align: middle;
		display: inline-block;
	}
	.up-ranking-invite-text-right{
		display: inline-block;
		font-size: 28upx;
		text-align: right;
		color: rgba(0,0,0,0.65);
	}
	.up-lucky{
		height: 100vh;
		margin-top: 160upx;
	}
	.up-lucky-close-btn{
		position: absolute;
		margin-left: 630upx;
		width: 48upx;
		height: 48upx;
		z-index: 999;
	}
	.up-lucky-main{
		border: 20upx solid #F44A4A;
		text-align: center;
		width: 490upx;
		height: 580upx;
		padding: 30upx;
		background: #FFFFFF;
		border-radius: 48upx;
		margin-left: 80upx;
	}
	.up-lucky-main>image{
		width: 490upx;
		height: 340upx;
	}
	.up-lucky-main-title{
		margin: 20upx 0;
		font-size: 30upx;
		font-weight: bold;
	}
	.up-lucky-main-btn{
		width: 320upx;
		margin-left: 90upx;
		margin-top: 50upx;
		padding: 10upx 0;
		font-size: 30upx;
		text-align: center;
		border-radius: 40upx;
		color: rgba(255,255,255,0.85);
		background-image: linear-gradient(90deg, #FE9543 14%, #FF664F 100%);
	}
	.up-lucky-button-group{
		margin-top: 40upx;
		color: rgba(0,0,0,0.65); 
		text-align: center;
	}
	.up-lucky-replay-button{
		display: inline-block;
		padding: 10upx 0;
		margin-right: 40upx;
		text-align: center;
		width: 240upx;
		font-size: 28upx;
		background: #F2F2F2;
		border-radius: 48upx;
		color: #ffffff;
		background-image: linear-gradient(90deg, #FE9543 14%, #FF664F 100%);
	}
	.up-lucky-replay-button>image{
		width: 30upx;
		height: 30upx;
		margin-top: -6upx;
		margin-right: 10upx;
		vertical-align: middle;
	}
	.up-lucky-share-button{
		display: inline-block;
		padding: 10upx 0;
		text-align: center;
		width: 240upx;
		font-size: 28upx;
		background: #F2F2F2;
		border-radius: 48upx;
		color: #ffffff;
		background-image: linear-gradient(90deg, #FE9543 14%, #FF664F 100%);
	}
	.up-lucky-share-button>image{
		width: 30upx;
		height: 30upx;
		margin-top: -6upx;
		margin-right: 10upx;
		vertical-align: middle;
	}
	/* 微信 */
	.we-chat{
		width: 670upx;
		padding: 44upx 0;
		font-size: 32upx;
		text-align: center;
		border-radius: 20upx;
		background-color: #ffffff;
	}
	.we-chat-img{
		/* width: 610upx;
		height: 55vh; */
		margin-top: 36upx;
		z-index: 100;
	}
	.wechat-number{
		margin-top: 54upx;
		margin-left: 50upx;
		text-align: left;
	}
	.wechat-number-btn{
		position: absolute;
		right: 50upx;
		width: 140upx;
		padding: 5upx 0;
		text-align: center;
		font-size: 26upx;
		color: #ffffff;
		border-radius: 30upx;
		display: inline-block;
		background-image: linear-gradient(90deg, #FE9543 14%, #FF664F 100%);
	}
	.we-chat-close-btn{
		position: absolute;
		margin-top: -120upx;
		right: 0upx;
		width: 48upx;
		height: 48upx;
		z-index: 999;
	}
	.recommend-money-card-icon{
		padding: 16upx 16upx 6upx 16upx; 
		margin-left: 40upx;
		margin-bottom: 30upx;
		width: 48upx; 
		background-color: #1CB419; 
		border-radius: 200upx;
	}
	button{
		color: #ffffff;
		background-color: #ffffff;
	}
	button[type=default]{
		background-color: #ffffff;
	}
	.share-tip-img{
		background-color: #ffffff; 
		width: 590upx; 
		height: 63vh;
		margin-bottom: 350upx;
	}
	.recommend-money-card-block{
		width: 100%;
		font-weight: bold; 
		display: inline-block;
		font-size: 13px;
		vertical-align: bottom;
		color: rgba(0,0,0,0.65);
	}
	.recommend-money-card-block-btn{
		display: inline-block;
		margin-left: 70upx;
		border: none;
		padding: 0;
		background: none;
		vertical-align: auto;
	}
	.recommend-money-card-block-btn::after{
		display: inline-block;
		border: none;
		background: none;
	}
	.red-luck{
		position: absolute; 
		right: 10upx; 
		background-color: red; 
		color: #ffffff; 
		font-size: 25upx; 
		border-radius: 100upx; 
		width: 35upx;
		height: 35upx;
		margin-top: 16upx;
	}
	.back-button{
		position: absolute; 
		width: 40upx; 
		height: 40upx;
		top:15upx;
		z-index: 9999;
	}
	.back-button-view{
		position: absolute; 
		width: 80upx; 
		height: 80upx;
		top: 85upx;
		left: 20upx;
		z-index: 9999;
	}
	/* .dianz>button{
		height: 100upx;
		padding: 0;
		margin-top: 200upx; 
		background-color:rgba(220,38,38,0.2);
	} */
	/* 分享提示 start */
		.popup_box_de_share {
			width: 100%;
			height: 100%;
			z-index: 999;
		}
	
		.popup_box_close_share {
			width: 300upx;
			height: 300upx;
			position: fixed;
			top: 10upx;
			right: 10upx;
		}
	
		/* 分享提示 end */
</style>
